# 导包
from selenium import webdriver
from time import sleep

from selenium.webdriver.common.by import By

# 获取浏览器对象
driver = webdriver.Chrome()

# 打开 url
url = "file:///D:/python/python-selenium-learn/a02_元素定位方式/learn-files/注册A.html"
driver.get(url)

# 查找用户名并输入内容 admin
driver.find_element(By.ID, "userA").send_keys("admin")

# 查找密码框并输入内容 123456
driver.find_element(By.ID, "passwordA").send_keys("123456")

# 暂停3秒
sleep(3)

# 关闭浏览器驱动对象
driver.quit()
